package com.sgb.kjwl.model.api;

import com.sgb.kjwl.model.entity.BannerEntity;
import com.sgb.kjwl.model.entity.MaterialMenuEntity;
import com.swgk.core.view.entity.MenuEntity;
import com.sgb.kjwl.model.entity.RecommendEntity;
import com.sgb.kjwl.model.entity.supplier3.DictEntity3;
import com.sgb.kjwl.model.entity.supplier3.SupplierRecommendEntity;
import com.swgk.core.base.model.entity.ListResponse;
import com.swgk.core.base.model.entity.BaseEntity;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * Description:
 * Author zhengkewen
 * Time 2019/4/2
 */
public interface HomeInterface {

    //获取首页banner
    @POST("v1/app/index/bannerList")
    Observable<BaseEntity<List<BannerEntity>>> getHomeBanner();

    //获取首页菜单类型选项
    @POST("v1/app/index/categoryItems")
    Observable<BaseEntity<List<MenuEntity>>> getHomeMenu();

    //获取首页推荐列表分类
    @POST("v1/app/index/recomandCate")
    Observable<BaseEntity<List<MaterialMenuEntity>>> getHomeRecommendType(@Body Map map);

    //获取首页材料推荐列表
    @GET("v1/app/index/recommandList")
    Observable<BaseEntity<List<RecommendEntity>>> getHomeRecommandList(@Query("areacode") String areacode, @Query("code") String code, @Query("limitNum") String limitNum);

    //获取供货商地图数据
    @POST("v1/app/material/supplier/mapSearch")
    Observable<BaseEntity<ListResponse<List<SupplierRecommendEntity>>>> getSupplierMapData(@Body Map map);

    //获取商品地图数据
    @POST("/v1/app/user/goods/promote/findPromoteGoods")
    Observable<BaseEntity<ListResponse<List<SupplierRecommendEntity>>>> getGoodsData(@Body Map map);

    //获取供货商城市选择条件数据
    @POST("v1/app/material/buyer/cityChoose")
    Observable<BaseEntity<List<DictEntity3>>> getSupplierCityData(@Query("areaCode") String areacode);

    //获取供货商距离选择条件数据
    @POST("v1/app/material/buyer/distanceChoose")
    Observable<BaseEntity<List<DictEntity3>>> getSupplierDistanceData();

    //获取供应商距离选择条件数据
    @POST("v1/app/material/supplier/getDistance")
    Observable<BaseEntity<List<DictEntity3>>> getDistance();

    //获取供货商智能排序选择条件数据
    @POST("v1/app/material/buyer/intellectChoose")
    Observable<BaseEntity<List<DictEntity3>>> getSupplierSortData();

    /***
     * 获取分类类别数据
     * @param areaCode
     * @return
     */
    @POST("v1/app/material/buyer/goodsCategory")
    Observable<BaseEntity<List<MenuEntity<MenuEntity<MenuEntity>>>>> getCategoryData(@Query("areaCode") String areaCode);

    //发现供应商列表
    @POST("v1/app/material/supplier/getSupplierList")
    Observable<BaseEntity<ListResponse<List<SupplierRecommendEntity>>>> getSupplierList(@Body Map map);

    //发现商品列表
    @POST("v1/app/user/goods/promote/findPromoteGoods")
    Observable<BaseEntity<ListResponse<List<SupplierRecommendEntity>>>> getGoodsList(@Body Map map);



}

